#include <assert.h>
#include "MultiPostManager.h"
#include "Store/MultiPostTable.h"

using namespace std;

namespace TCServer
{
    namespace Manager
    {
        MultiPostManager::MultiPostManager()
        {
        }

        MultiPostManager::~MultiPostManager()
        {
        }

		QList<QVariantMap> MultiPostManager::queryNewer(const QDateTime &time, uint number)
		{
			return Store::MultiPostTable::queryNewer(time, number);
		}

		QList<QVariantMap> MultiPostManager::queryOlder(const QDateTime &time, uint number)
		{
			return Store::MultiPostTable::queryOlder(time, number);
		}

		TCServer::Manager::MultiPostManager* MultiPostManager::instance()
		{
			static MultiPostManager * _instance = new MultiPostManager;
            return _instance;
        }

        bool MultiPostManager::newPost(quint64 userId,
            const QString &type,
            const QString &imageCount,
            const QString &mainImage,
            const QString &audioSource,
            const QString &comment)
        {
            return Store::MultiPostTable::insert(userId, type, imageCount, mainImage, audioSource, comment);
        }

    }
}